
#include "Component/Coordinates.hpp"

using namespace	Component;

Coordinates::Coordinates()
	:	sf::Vector2f(),
		_angle(.0f)
{
}

Coordinates::Coordinates(float xpos, float ypos, float angle)
	:	sf::Vector2f(xpos, ypos),
		_angle(angle)
{
}

Coordinates::Coordinates(Coordinates const &c)
	:	sf::Vector2f(c),
		_angle(c._angle)
{
}


Coordinates const	&Coordinates::operator=(Coordinates const &pos)
{
	if (this != &pos)
	{
		this->x = pos.x;
		this->y = pos.y;
		this->_angle = pos._angle;
	}

	return (*this);
}


float		Coordinates::getX() const throw()
{
	return (this->x);
}
float		Coordinates::getY() const throw()
{
	return (this->y);
}
float		Coordinates::getAngle() const throw()
{
	return (this->_angle);
}

void		Coordinates::setX(float xpos)
{
	this->x = xpos;
}
void		Coordinates::setY(float ypos)
{
	this->y = ypos;
}
void		Coordinates::setPosition(float xpos, float ypos)
{
	this->x = xpos;
	this->y = ypos;
}
void		Coordinates::setTranslation(float xpos, float ypos)
{
	this->x += xpos;
	this->y += ypos;
}
void		Coordinates::setAngle(float angle)
{
	this->_angle = angle;
}
void		Coordinates::setRotation(float angle)
{
	this->_angle += angle;
}


Coordinates::~Coordinates() throw()
{
}
